#!/usr/bin/python
# -*- coding: utf-8 -*-
import logging
import logging.config
import os

path = os.getcwd()
log_path = "%s/log/" % path

if not os.path.exists(log_path):
    os.mkdir(log_path)

logging.config.fileConfig('%s/conf/logging.conf' % path, defaults={"logpath": log_path})


def process_log():
    return logging.getLogger('root')


def error_log():
    return logging.getLogger('error')


def warn_log():
    return logging.getLogger('warning')


def runtime(msg):
    process_log().info(msg)
